<%--
  Created by IntelliJ IDEA.
  User: hellcat
  Date: 2019/12/21
  Time: 16:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@include file="extra/body.jsp" %>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">商品管理
                    <button type="button" class="layui-a-tips layui-btn layui-btn-warm layui-btn-sm"
                            id="waresAdd">
                        创建商品
                    </button>
                </div>
                <div class="layui-card-body">
                    <div class="layui-form">
                        <div class="layui-form-item">
                            <%--        第一排--%>
                            <div class="layui-inline">
                                <label class="layui-form-label">条码/名称</label>
                                <div class="layui-input-inline">
                                    <input id="waresIdOrNameVal" class="layui-input" type="text" autocomplete="off"
                                           placeholder="商品条码/名称" style="padding-right: 60px;">
                                    <button id="waresIdOrNameBtn" type="button" class="layui-btn layui-btn-primary"
                                            style="position: absolute;top: 0;right: 0px;">
                                        <i class="layui-icon">&#xe615;</i>
                                    </button>
                                </div>

                                <label class="layui-form-label">分类选择</label>
                                <div class="layui-input-inline">
                                    <select lay-filter="Category1" id="category1">
                                        <option value="">全部</option>
                                        <c:forEach items="${Category1}" var="Category">
                                            <option value="${Category.categoryId}">${Category.categoryName}</option>
                                        </c:forEach>
                                    </select>
                                </div>
                                <div class="layui-input-inline">
                                    <select lay-filter="Category2" id="category2">
                                        <option value="">全部</option>
                                    </select>
                                </div>
                            </div>
                            <%--        第二排--%>
                            <div class="layui-inline">
                                <label class="layui-form-label">销售状态</label>
                                <div class="layui-input-inline">
                                    <select lay-filter="waresStatus" id="waresStatus">
                                        <option value="">全部</option>
                                        <option value="1">在售</option>
                                        <option value="0">下架</option>
                                    </select>
                                </div>
                            </div>
                            <%--                            <a href="javascript:window.location.reload();" style="color: red">清空筛选条件</a>--%>
                            <%--            商品数据表格--%>

                            <table class="layui-table" id="waresTable" lay-filter="waresTable"></table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</div>
</div>
<%@include file="waresEdit.jsp" %>
<%@include file="waresAdd.jsp" %>
<script src="../static/js/wares.js"></script>
<%@include file="extra/footer.jsp" %>